def list_while_func():
    """
    使用while循环遍历列表的演示函数
    :return:
    """
    my_list = ["传智教育", "黑马程序员", "Python"]
    index = 0
    print("[", end="")
    while index < len(my_list):
        print(my_list[index], " ", end="")
        index += 1
    print("]")


def list_for_func():
    """
    使用for循环遍历列表的演示函数
    :return:
    """
    my_list = ["传智教育", "黑马程序员", "Python"]
    for element in my_list:
        print(element, " ", end="")


# list_while_func()
list_for_func()
